from pydantic import BaseModel
from typing import List, Optional

class PredictionRequest(BaseModel):
    text: str

class PredictionResponse(BaseModel):
    label: str  # "spam" or "ham"
    confidence: float
    cot: str  # 思维链推理过程

class BatchPredictionRequest(BaseModel):
    texts: List[str]

class BatchPredictionResponse(BaseModel):
    predictions: List[PredictionResponse] 